package com.tanhua.dubbo.api;

import com.tanhua.model.mongo.Movement;
import com.tanhua.model.vo.PageResult;

import java.util.List;

public interface MovementApi {
    //保存
    String save(Movement movement);

    //根据userID分页查询
    List<Movement> findUserId(Long userId, Integer page, Integer pageSize);

    //根据id查询
    List<Movement> findByFriendId(Long friendId, Integer page, Integer pageSize);

    //根据动态id查询
    List<Movement> findByMovementIds(String[] movementIds, Integer page, Integer pageSize);

    //随机查询
    List<Movement> randomMovement(Integer pageSize);

    //根据id查询
    Movement findById(String id);

    //状态更新
    void updateState(String movementId, Integer state);

    //根据用户id和状态进行查询
    PageResult findMovement(Integer page, Integer pagesize, Long uid, Integer states);
}
